﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MoneyWentWhere.DataModel.Reports
{
    public class ExpenseByCurrencyReport : ExpenseReport<Currency>
    {
        public ExpenseByCurrencyReport(TimeSpanUnit periodUnit) : base(periodUnit) { }

        protected override List<Currency> CreateColumns(MoneyDataSet dataSet)
        {
            List<Currency> curs = new List<Currency>(dataSet.Currencies);
            curs.Sort();
            return curs;
        }

        protected override int GetColumnIndex(Transaction tx)
        {
            return _columns.IndexOf(tx.Account.Currency);
        }
    }
}
